package com.example.footballsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GameUserMapper {
    @Insert("insert into game_user values (#{seriesID},#{userAccount},#{createdate})")
    public Boolean addPlayerGame(int seriesID,String userAccount,String createdate);
    @Select("select seriesID from game_user where UserAccount=#{userAccount}")
    public List<Integer> getMineGame(String account);
    @Select("select UserAccount from game_user where seriesID=#{seriesID}")
    public List<String> getUserInGame(int seriesID);
    @Select("select COUNT(seriesID) from game_user group by UserAccount")
    public List<Integer> getUserCount();
    @Select("select COUNT(*) from game_user")
    public Integer count();
}
